const option = {
    title: {
        text: '访客记录图表'
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: { // hover有十字标记
            type: 'cross'
        }
    },
    legend: {
        data: ['近七天总数', '外来学生', '外来老师', 'Direct', 'Search Engine']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        show: true,
        type: 'category',
        // boundaryGap: false,
        axisLine: {
            show: true, // 是否显示x轴线
            lineStyle: {
                color: '#555' // 轴线颜色
            }
        },
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: [
        {
            show: true,
            // boundaryGap: true,
            type: 'value',
            name: '人数',
            position: 'left',
            alignTicks: true,
            axisLabel: {
                formatter: '{value} ' // value单位
            },
            axisLine: {
                show: true, // 是否显示y轴线
                lineStyle: {
                    color: '#555'
                }
            }
        }
    ],
    series: [
        {
            name: '近七天总数',
            type: 'line',
            stack: 'Total',
            data: [120, 132, 101, 134, 90, 230, 210]
        },
        {
            name: '外来学生',
            type: 'line',
            stack: 'Total',
            data: [220, 182, 191, 234, 290, 330, 310]
        },
        {
            name: '外来老师',
            type: 'line',
            stack: 'Total',
            data: [150, 232, 201, 154, 190, 330, 410]
        },
        {
            name: 'Direct',
            type: 'line',
            stack: 'Total',
            data: [320, 332, 301, 334, 390, 330, 320]
        },
        {
            name: 'Search Engine',
            type: 'line',
            stack: 'Total',
            data: [820, 932, 901, 934, 1290, 1330, 1320]
        }
    ]
};
